package com.yh.wuye.view;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.View.OnClickListener;
import android.widget.Button;

public class Report extends BaseActivity
{
  private Button btnBarChart;
  private Button btnLineChart;
  private Button btnUnCharge;
  @Override
  public void onCreate(Bundle savedInstanceState)
  {
    super.onCreate(savedInstanceState);
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    setContentView(R.layout.report);
    initView();
  }
  
  
  
  @Override
  protected void initView()
  {
    // TODO Auto-generated method stub
    super.initView();
    btnBarChart = (Button)findViewById(R.id.btnBarChart);
    btnBarChart.setOnClickListener(onBarChart);
    
    btnLineChart = (Button)findViewById(R.id.btnLineChart);
    btnLineChart.setOnClickListener(onLineChart);
    
    btnUnCharge = (Button)findViewById(R.id.btnUnCharge);
    btnUnCharge.setOnClickListener(onUnCharge);
  }



  private OnClickListener onBarChart = new OnClickListener()
  {
    @Override
    public void onClick(View v)
    {
      Intent intent = new Intent(ctx, PieChart.class);
      startActivity(intent);
    }
  };
  
  private OnClickListener onLineChart = new OnClickListener()
  {
    @Override
    public void onClick(View v)
    {
      Intent intent = new Intent(ctx, LineChart.class);
      startActivity(intent);
    }
  };
  
  private OnClickListener onUnCharge = new OnClickListener()
  {
    @Override
    public void onClick(View v)
    {
//      Uri uri = Uri.parse(getResources().getString(R.string.url_91soft));
      Uri uri = Uri.parse("http://youngsuns.3322.org:18080/");
      Intent intent = new Intent(Intent.ACTION_VIEW, uri);
      startActivity(intent);
    }
  };
  
}
